package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 床位和房间关联表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_beds")
@Schema(name = "ElderBeds", description = "床位和房间关联表")
public class ElderBeds {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "房间ID")
    @TableField("room_id")
    private Long roomId;

    @Schema(description = "床位号")
    @TableField("bed_number")
    private String bedNumber;

    @Schema(description = "床位类型（单人床、双人床、护理床等）")
    @TableField("bed_type")
    private String bedType;

    @Schema(description = "床位状态：0-空闲，1-已占用，2-维修中，3-预留")
    @TableField("bed_status")
    private Integer bedStatus;

    @Schema(description = "入住长者ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "入住时间")
    @TableField("check_in_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkInTime;

    @Schema(description = "月租费用")
    @TableField("monthly_fee")
    private BigDecimal monthlyFee;

    @Schema(description = "押金")
    @TableField("deposit")
    private BigDecimal deposit;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    @Schema(description = "删除标志：0-未删除，1-已删除")
    @TableField("del")
    private Integer del;
}
